<div #contentElement [class]="question.cssClasses.tableWrapper">
  <table [class]="question.getTableCss()">
    <thead *ngIf="table.showHeader">
      <tr>
        <ng-container *ngFor="let cell of table.headerRow.cells; trackBy: trackCellBy">
          <th *ngIf="cell.hasTitle" [class]="cell.className" [style]="{ minWidth: cell.minWidth, width: cell.width }">
            <ng-template
              [component]="{ name: question.getColumnHeaderWrapperComponentName($any(cell)), data: { componentData: question.getColumnHeaderWrapperComponentData($any(cell)) } }">
              <sv-ng-string [model]="cell.locTitle"></sv-ng-string>
              <sv-ng-matrixheaderrequired *ngIf="!!cell.column" [column]="cell.column" [question]="question">
              </sv-ng-matrixheaderrequired>
            </ng-template>
          </th>

          <td *ngIf="!cell.hasTitle" [class]="cell.className" [style]="{ minWidth: cell.minWidth, width: cell.width }">
          </td>
        </ng-container>
      </tr>
    </thead>
    <tbody>
      <ng-container *ngFor="let row of table.renderedRows; trackBy: trackRowBy">
        <sv-ng-matrix-row [model]="row" [question]="question"></sv-ng-matrix-row>
      </ng-container>
    </tbody>
    <tfoot *ngIf="table.showFooter">
      <tr>
        <sv-ng-matrixdropdown-cell [cell]="cell" [question]="question"
          *ngFor="let cell of table.footerRow.cells; trackBy: trackCellBy">
        </sv-ng-matrixdropdown-cell>
      </tr>
    </tfoot>
  </table>
</div>